package bpel.instructions;

import bpel.BPELProcess;

/**
 * 
 * @author Maurice & Topia
 * 
 */
public class BPELCopy extends BPELInstruction {
	private BPELFrom from;
	private BPELTo to;

	public BPELCopy() {
		/* nothing */
	}

	public BPELFrom getFrom() {
		return from;
	}

	public void setFrom(BPELFrom from) {
		this.from = from;
	}

	public BPELTo getTo() {
		return to;
	}

	public void setTo(BPELTo to) {
		this.to = to;
	}

	@Override
	public String toString() {
		return to.toString() + " := " + from.toString();
	}

	@Override
	public String execute(BPELProcess process) {

		to.receive(from.getValue(process), process);

		return null;
	}
}
